1. Field of the Invention
The present invention relates to decoders having an alias mechanism. More specifically, the present invention relates to decoding a macroinstruction to provide an immediate field for a micro-operation.
2. Description of Related Art
Computers process information by executing a sequence of instructions, which may be supplied from a computer program written in a particular format and sequence designed to direct the computer to operate a particular sequence of operations. Most computer programs are written in high level languages such as FORTRAN or "C" which are not directly executable by the computer processor. These high level instructions are translated into instructions, termed "macroinstructions" herein, having a particular format suitable for the processor in which they will be executed. Within the processor, macroinstructions are supplied to a decoder, which decodes them into micro-operations and then issues them to subsequent units for execution.
The micro-operations issued from the decoder have a format particularly suited for those execution units. For example, an issued micro-operation may include opcode fields, immediate fields, one or two source fields, and a destination field, among others.
In order to issue an immediate field for micro-operation, the decoder must be able to direct data from a number of different sources into the immediate field when the micro-operation is issued. A macro-opcode may implicitly specify an immediate. For example, the INC (increment by one) macroinstruction can be implemented with an ADD micro-operation that adds the immediate "one" to the contents of a register. In this case, the macroinstruction implies a literal of "one", which is immediate data that must be inserted into the ADD micro-operation. Other immediate data includes a branch target address and a fall-through address that are provided by a branch address calculation mechanism. In a decoder having an alias mechanism, still another source of data is that which has been extracted explicitly from a macroinstruction. For example, a 32-bit displacement or 32-bit immediate value specified in macroinstructions can be extracted and stored in an alias register.
It would be an advantage to provide a decoder with an efficient mechanism for inserting source data from one of multiple sources into the immediate field which can then become a part of a micro-operation issued from the decoder. A cost-related consideration is minimization of circuitry required to implement the immediate decoding mechanism. In summary, it would be an advantage to provide a fast, efficient, and space-minimizing implementation of a circuitry for providing an immediate field in a decoder.